1. Field of the Invention
The invention relates generally to a digital processing system for devices that communicate via unidirectional rings, and more particularly to method and apparatus for removing stale packets from the system.
2. Description of the Prior Art
IEEE P1596 SCI (scalable coherent interface) Standards specifies protocols for devices that communicate via unidirectional rings. For each device connection, the ring is broken, and a device interposed such that the ring flows into the input port of the device and out again onto the ring. Encapsulated streams of information, known as packets, originate with a device known as the requesting device or requester, and travel across one or more rings to a device known as the responding device or responder, then return back along the same or alternate pathway.
A device may insert packets onto a ring to which it is connected, pass packets through from input to output, or extract packets from the ring. If a packet is extracted from the ring, a copy is not passed to the device's output or onto the ring. All devices within a system may be connected within a single ring, or one device may be connected into two or more rings by an agent function. Agents selectively move packets between rings in order to transport packets between devices on distinct rings.
Each connection point on a device to a ring, known as a port, has the capability to scrub packets. Exactly one scrubbing function is enabled per ring. Within each packet, there is a single bit field defined as the old bit. Each time a packet is inserted onto the ring, the old bit is cleared. When such a packet passes through the enabled scrubber, the scrubber examines the state of the old bit field. If the state is still clear, the old bit field is set. If the old bit field is already set on arrival, then the entire packet is extracted from the ring and discarded. This bounds the time a packet may continuously travel on one ring to a little less than two cycles.
The old bit limits continuous travel on a single ring, but does not bound the total time a packet may travel on two or more rings. IEEE P1596 SCI Standards specifies a time-of-removal (TOR), time-stamp field embedded within the packet, to denote when the packet should be extracted and discarded. The time of removal is set based on the time at which a packet originates at the requestor plus some time interval thought to allow any correct transport to occur. The time of removal is encoded using mantissa and exponent values.
While the old bit removes stale packets from a single ring in a simple fashion, the time-of-removal policy requires a global time from which to initially calculate the time of removal that is both difficult and expensive in terms of logic or cell count. Determining a time interval during which all correctly routed packets must be delivered is difficult and error prone. Decrementing and comparing a mantissa and exponent representation of the time of removal is much more difficult than comparable operations on an integer, especially if the time-of-removal encoding wraps around to zero.
Also, transmission of a packet across a ring may be retried if an echo of the sent packet is not received within a time-out period. The number of times such transmission occurs must be bounded to some integer number of retries. When this number of retries has been exceeded without receipt of an echo, higher level protocols depend on termination of retry events. Counting the number of attempts to insert a packet onto a ring requires a modest amount of dedicated logic.
A need exists for a stale packet removal method that eliminates the need for a single system-wide time reference as required for the SCI Standards time-of-removal mechanism. A need exists for a stale packet removal method that is simple to implement, efficient and reliable.